import request from "@/config/axios";
//创建角色
export function addRole(data: any) {
  return request.post({
    url: "/addRole",
    data,
  });
}
//查询所有角色列表
export function getAllRoleList(data: any) {
  return request.post({
    url: "/getAllRoleList",
    data,
  });
}
//查询角色分页列表
export function getRoleList(data: any) {
  return request.post({
    url: "/getRoleList",
    data,
  });
}
//删除角色
export function deleteRole(data: any) {
  return request.post({
    url: "/deleteRole",
    data,
  });
}
//编辑角色
export function editRole(data: any) {
  return request.post({
    url: "/updateRole",
    data,
  });
}
//批量更新创建或覆盖角色-菜单关系
export function updateRoleMenu(data: any) {
  return request.post({
    baseApiUrl: "/relation",
    url: "/batchBuildRelation",
    data,
  });
}
